<?php
// +----------------------------------------------------------------------------
// | Tke团队版权所属 [三十年河东三十年河西,莫欺少年穷.!]
// +----------------------------------------------------------------------------
// | Copyright (c) 2014 http://www.itdaodan.com All rights reserved.
// +----------------------------------------------------------------------------
// | Author: PHP@妖孽 <dino_ma@163.com>
// +----------------------------------------------------------------------------
/**
 +------------------------------------------------------------------------------
 * 前台基类
 +------------------------------------------------------------------------------
 * @version   1.0
 * @since 2014-9-3
 +------------------------------------------------------------------------------
 */
namespace Home\Controller;
use Think\Controller;

class HomeController extends Controller {
	
	 protected  $generalize_member_id='';//推广人id
	 protected  $generalize_url='';//推广人链接
	
    /**
     *@todo 前端控制器初始化
     */
    protected function _initialize(){
		//获取推广链接.get or cookie
		$get_url = trim(I('get.sdsfd_extend'));
		if($get_url !=''){
			cookie('sdsfd_extend',$get_url);
		}
		if(cookie('sdsfd_extend')){
			$this->generalize_url = cookie('sdsfd_extend');
		}
		// 获取当前用户ID
		if(!defined('UID')){
		    define('UID',is_login());
		}
		//--------生成推广链接-------------///
		$this->assign('post_url',__SELF__);
    }
    
    /**
     * @todo 定义空方法
     */
    public function _empty(){
    	
    }
}
